home *** CD-ROM | disk | FTP | other *** search
/ Champak 103 / Vol 103.iso / games / tontie_h.swf / scripts / DefineSprite_241 / frame_97 / PlaceObject2_240_1 / CLIPACTIONRECORD onClipEvent(load).as
Text File  |  2010-03-13  |  860b  |  37 lines

  1. onClipEvent(load){
  2.    if(_parent.item == 0)
  3.    {
  4.       k = Math.floor(Math.random() * 5);
  5.       if(k > 2)
  6.       {
  7.          _parent._parent._parent._parent.enemy_i = 0;
  8.          _parent._parent._parent.joutai = "down";
  9.          with(this)
  10.          {
  11.             gotoAndStop("non");
  12.          }
  13.       }
  14.       else
  15.       {
  16.          _root.sound("item_on");
  17.          k = Math.floor(Math.random() * 5 + 1);
  18.          if(k <= 4)
  19.          {
  20.             this.gotoAndStop("coin");
  21.          }
  22.          else if(k == 4)
  23.          {
  24.             this.gotoAndStop("life");
  25.          }
  26.          _parent._parent._parent._parent.enemy_i = 2;
  27.          _parent._parent._parent.k = _root.top_stay;
  28.       }
  29.    }
  30.    else
  31.    {
  32.       _root.sound("item_on");
  33.       _parent._parent._parent._parent.enemy_i = 2;
  34.       this.gotoAndStop(_parent.item);
  35.    }
  36. }
  37.